// components/ng-next-popup/index.js
Component({
  properties: {
    show: {
      type: Boolean,
      value: false,
    },
    title: {
      type: String,
      value: '提示'
    },
    message: {
      type: String,
      value: '提示内容'
    },
    btn: {
      type: String,
      value: '确认'
    },
    align: {
      type: String,
      value: 'center',
    }
  },
  observers: {
    show(val) {
      if (val) {
        setTimeout(() => {
          this.setData({ formShow: true })
        })
      } else {
        this.setData({ formShow: false })
      }
    }
  },
  data: {
    formShow: false,
  },
  methods: {
    onClose() {
     
      this.triggerEvent('close')
    },
    confirm(){
      this.triggerEvent('confirm')
    }
  }
})
